home *** CD-ROM | disk | FTP | other *** search
- @echo off
- REM ****************************************************************
- REM *** Reboot_2.bat - Reboot computer by jumping to BIOS reboot ***
- REM *** ver.1 routine. This is an example of the CEnvi ***
- REM *** asm() function. To provide protection ***
- REM *** from accidentaly rebooting, you must ***
- REM *** enter PLEASE as the first parameter. ***
- REM ****************************************************************
-
-
- REM **************************************************************
- REM *** Check that "PLEASE" is the first parameter. CEnvi ***
- REM *** return errorlevel if it is not please. ***
- REM **************************************************************
- CEnvi return( strcmpi("%1","Please") ? 1 : 0 )
- if errorlevel 1 GOTO PLEASE
-
- REM ************************************************
- REM *** Set warm boot flag to avoid memory tests ***
- REM ************************************************
- CEnvi poke(0x472,0x1234,UWORD16);
-
- REM ********************************************************
- REM *** Call Dos disk reset to make smartdrive 4.x flush ***
- REM ********************************************************
- CEnvi reg.ah = 0x0D; interrupt(0x21,reg);
-
- REM **********************************************************
- REM *** Set ctrl-alt-del scan code for EMM386 to shut down ***
- REM **********************************************************
- CEnvi "poke(0x417,peek(0x417)|0x0C); reg.ax=0x4F53; interrupt(0x15,reg);"
-
- REM **************************************************************
- REM *** A routine for rebooting is in the BIOS at location ***
- REM *** FFFF:0000. To reboot, will use the CEnvi asm() ***
- REM *** to execute the machine code: JMPF FFFF:0000, which in ***
- REM *** machine code is the byte sequence EA 00 00 FF FF. ***
- REM **************************************************************
- CEnvi asm('\xEA\x00\x00\xFF\xFF');
-
- :CENVI_EXIT
-
- :PLEASE
- ECHO Reboot_2.bat will reboot your computer. To execute Reboot.bat you
- ECHO must enter: REBOOT_2 PLEASE
-